package com.huawei.appgallery.wlanapp.ui.card;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import com.huawei.appgallery.foundation.ui.framework.widget.Space;
import o.cdr;
import o.cih;
import o.deh.c;
import o.deh.e;

public class WlanAppNode extends cdr {
    private Context ˊ;

    public WlanAppNode(Context context) {
        super(context, context.getResources().getInteger(e.ˎ));
        this.ˊ = context;
    }

    public int ˏ() {
        return this.ˊ.getResources().getInteger(e.ˎ);
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -2);
        layoutParams.weight = 1.0f;
        int ˏ = ˏ();
        LayoutInflater from = LayoutInflater.from(this.ॱ);
        for (int i = 0; i < ˏ; i++) {
            View spaceEx;
            if (i != 0) {
                spaceEx = new Space(this.ॱ);
                spaceEx.setLayoutParams(new LinearLayout.LayoutParams(this.ˋ, -1));
                viewGroup.addView(spaceEx);
            }
            spaceEx = from.inflate(c.ˋ, null);
            cih wlanAppCard = new WlanAppCard(this.ॱ);
            wlanAppCard.ˏ(spaceEx);
            ˊ(wlanAppCard);
            viewGroup.addView(spaceEx, layoutParams);
        }
        return true;
    }
}
